package com.xy.fragment1;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.xy.fragment1.ui.main.MainFragment;
import com.xy.fragment1.util.UILog;

public class MainActivity extends AppCompatActivity {

    private UILog log = new UILog(this);

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_activity);
        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.container, MainFragment.newInstance())
                    .commitNow();

        }
        this.getLifecycle().addObserver(new LifeComponent());

    }
}
